<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>   
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>

<html>
<head>
    <title>五彩水果城</title>
	<link  rel="stylesheet" type="text/css" href="${base}/static/css/public.css"/>
	<link  rel="stylesheet" type="text/css" href="${base}/static/css/index.css"/>
	<link  rel="stylesheet" type="text/css" href="${base}/static/css/swiper.min.css"/>
	<script type="text/javascript" src="${base}/static/js/lib/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="${base}/static/js/lib/swiper.min.js"></script>  
</head>
<body>
<%@ include file="/WEB-INF/common/js.jsp"%>
<%@ include file="/WEB-INF/common/header.jsp"%>
<%@ include file="/WEB-INF/common/footer.jsp"%>
<!-- 头部 -->
<header>
	<div class="public-top">
		<div class="topbar">
			<div class="user-entry">
				嗨！欢迎来<a href="" title="首页" alt="首页">五彩水果城</a>
				<a href="${base}/tologin" onclick="tologin()">请登录</a>
				<a href="${base}/toreg" onclick="toreg()">免费注册</a>
			</div>
			<div class="quick-menu">
				<dl class="saller">
					<dt>商家管理</dt>
					<dd></dd>
				</dl>
				<dl class="order">
					<dt>我的订单</dt>
					<dd></dd>
				</dl>
				<dl class="collection">
					<dt>我的收藏</dt>
					<dd></dd>
				</dl>
				<dl>
					<dt></dt>
					<dd></dd>
				</dl>
			</div>
		</div>
	</div>
	<!-- 头部logo、搜索等 -->
	<div class="header-layout">
		<div class="public-head">
			<h1>五彩水果城</h1>
			<div class="search">
				<div class="serch-tab">
					<ul>
						<li>商品</li>
					</ul>
				</div>
				<form class="search-form" method="get" action="">
					<input type="hidden" value="store_list" name="act" id="search_act" class="act">
					<input placeholder="请输入您要输入的商品关键字" class="input_text" id="keyword" value maxlength="60">
					<input type="submit" class="input-submit" value="搜索" id="button">
				</form>
			</div>
			<div class="shopper">
				<div class="myshopper">我的商城</div>
				<div class="shopper-car">购物结算</div>
			</div>
		</div>
	</div>
</header>
<!-- 内容 -->
<section>
	<div class="home-focus-layout">
			<div class="swiper-container">
	        <div class="swiper-wrapper">
	            <div class="swiper-slide"><img alt="" src="${base}/static/images/pic8.jpg"></div>
	            <div class="swiper-slide"><img alt="" src="${base}/static/images/pic3.jpg"></div>
	            <div class="swiper-slide"><img alt="" src="${base}/static/images/pic5.jpg"></div>
	            <div class="swiper-slide"><img alt="" src="${base}/static/images/pic6.jpg"></div>
	            <div class="swiper-slide"><img alt="" src="${base}/static/images/pic7.jpg"></div>
	            <div class="swiper-slide"><img alt="" src="${base}/static/images/pic2.jpg"></div>
	            <div class="swiper-slide"><img alt="" src="${base}/static/images/pic9.jpg"></div>
	            <div class="swiper-slide"><img alt="" src="${base}/static/images/pic10.jpg"></div>
	        </div>
	        <!-- Add Pagination -->
	        <div class="swiper-pagination"></div>
	        <!-- Add Arrows -->
	        <div class="swiper-button-next"></div>
	        <div class="swiper-button-prev"></div>
	    </div>
	</div>
</section>
<!-- 底部 -->
<footer></footer>




<script>
    var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        paginationClickable: true,
        spaceBetween: 30,
        centeredSlides: true,
        autoplay: 2500,
        autoplayDisableOnInteraction: false
    });
    </script>








 <!-- <div class="header">
	<h2>五彩色水果城</h2>
</div>
<c:if test="${user==null}">
<a href="${base}/tologin" onclick="tologin()">登录</a>
</c:if>
<c:if test="${user!=null}">
<p>欢迎你，${user.realName}</p>
</c:if>

<table id="listUser">
	<caption>用户列表</caption>
	<tr>
		<th>编号</th>
		<th style="width: 60px;">姓名</th>
		<th style="width: 100px;">角色</th>
	</tr>
	<c:forEach items="${listUser}" var="listUser" varStatus="status">
	<tr>
		<td>${status.index+1}</td>
		<td>${listUser.realName}</td>
		<td>${listUser.roleName}</td>
	</tr>
	</c:forEach>
</table>
<br><br><br><br>
<div id="add">
<form >
	<table>
	<caption>添加用户</caption>
		<tr>
			<td>用户名：</td>
			<td><input type="text" id="userName"/></td>
		</tr>
		<tr>
			<td>密码：</td>
			<td><input type="password" id="password"/></td>
		</tr>
		<tr>
			<td>角色：</td>
			<td>
				<select id="role_id">
					<c:forEach items="${listRole}" var="listRole">
				    	 <option value="${listRole.id}">${listRole.roleName}</option>
					</c:forEach>
				</select>
			</td>
		</tr>
		<tr><td colspan="2"><button  id="addd" onclick="addUser()">添加</button></td></tr>
	</table>
</form>
</div>

<script type="text/javascript">
	function addUser(){
		var username = $("#userName").val();
		var password = $("#password").val();
		var role_id = $("#role_id").val();
		 $.post("${base}/reg",{username:username,password:password,role_id:role_id},function(data){
			if(data.code==200){
				alert("添加成功！")
			}else{
				alert("添加失败！")
			}
		}); 
	}
	
	
	
</script> -->

</body>
</html>
